/**
 * Copyright (C), 1968-2018, 美的集团股份有限公司
 * FileName: MyBatisPlusConfig
 * Author:   FanYL
 * Date:     2018/12/16 00:56
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.ruiysoft.crm.config;

import cn.taroco.common.bean.interceptor.DataScopeInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @Description:
 * @author: FanYL
 * @date: 2018/12/16 00:56
 * @version: 1.0.0
 */
@Configuration
@MapperScan("com.ruiysoft.*.mapper")
public class MybatisPlusConfig {
    /**
     * 分页插件
     *
     * @return PaginationInterceptor
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }


    /**
     * 数据权限插件
     *
     * @return DataScopeInterceptor
     */
    @Bean
    public DataScopeInterceptor dataScopeInterceptor() {
        return new DataScopeInterceptor();
    }

}



